"! Info:
Optimised small integer class (14bit).
Examples:

"
Number subclass: SmallInt [
<category: 'Library-Numbers'>
"! Info:

Examples:
"
* arg [
<smallintMult self arg>
(arg isMemberOf: SmallInt) ifFalse: [^ self * arg asSmallInt].
self primitiveFailed
]

"! Info:

Examples:
"
+ arg [
<smallintAdd self arg>
(arg isMemberOf: SmallInt) ifFalse: [^ self + arg asSmallInt].
self primitiveFailed
]

"! Info:

Examples:
"
- arg [
<smallintSub self arg>
(arg isMemberOf: SmallInt) ifFalse: [^ self - arg asSmallInt].
self primitiveFailed
]

"! Info:

Examples:
"
< arg [
<smallintLess self arg>
(arg isMemberOf: SmallInt) ifFalse: [^ self < arg asSmallInt].
self primitiveFailed
]

"! Info:

Examples:
"
= arg [
<smallintEqual self arg>
(arg isKindOf: Number) ifTrue: [
	^ self = arg asSmallInt
].
^ false.
]

"! Info:

Examples:
"
asInteger [
^ Integer new: self
]

"! Info:

Examples:
"
asSmallInt [
^ self
]

"! Info:

Examples:
"
bitAnd: arg [
<smallintBitAnd self arg>.
^ (self bitAnd: arg asSmallInt)
]

"! Info:

Examples:
"
bitOr: arg [
<smallintBitOr self arg>.
^ (self bitOr: arg asSmallInt)
]

"! Info:

Examples:
"
bitShift: arg [
<smallintShift self arg>.
(arg isKindOf: SmallInt) ifTrue: [ self overflow ].
^ (self bitShift: arg asSmallInt)
]

"! Info:
Return the quotient (division) of this number and arg. This only performs integer division.
Examples:
\"prints 4\"
(9 / 2) printNl.
"
/ arg [
<smallintDiv self arg>
(arg isMemberOf: SmallInt) ifFalse: [
	^ self / arg asSmallInt
].
(0 = arg) ifTrue: [
	^ self divzero
].
self primitiveFailed
]

"! Info:

Examples:
"
rem: arg [
<smallintMod self arg>
(arg isMemberOf: SmallInt) ifFalse: [^ self rem: arg asSmallInt].
(0 = arg) ifTrue: [^ self divzero].
self primitiveFailed
]

"! Info:

Examples:
"
truncSmallInt [
^ self
]

]

"! Class methods for SmallInt "
MetaNumber subclass: MetaSmallInt [
<category: 'Library-Numbers'>
"! Info:
Return a random number.
Examples:

"
atRandom [
<smallintRandom>
]

]

